<?php
namespace app\modules\api\models;

use yii;
use yii\db\Query;

class Department
{
    private $table;

    public function __construct()
    {
        $this->table = yii::$app->db->tablePrefix.'department';
    }

    /**
     * 员工分组信息
     * @return array
     */
    public function list():array
    {
        $db = new Query();
        return $db->select('*')->from($this->table)->all();
    }
}